<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>Class: tinymce.UndoManager</title>
<meta name="generator" content="MoxieDoc" />

<link rel="stylesheet" type="text/css" href="css/reset.css" />
<link rel="stylesheet" type="text/css" href="css/grids.css" />
<link rel="stylesheet" type="text/css" href="css/general.css" />

<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
	google.load("jquery", "1.3");
</script>
<script type="text/javascript" src="js/jquery.treeview.min.js"></script>
<script type="text/javascript" src="js/general.js"></script>
</head>
<body>
<div class="classDetailsContent">
<h1>tinymce.UndoManager</h1>
<table class="classDetails">
<tr>
<td class="first">Namespace</td>
<td class="last">tinymce</td>
</tr>
<tr>
<td class="first">Class</td>
<td class="last">UndoManager</td>
</tr>
</table>
<div class="classDescription">This class handles the undo/redo history levels for the editor. Since the build in undo/redo has major drawbacks a custom one was needed.
</div>
<div class="summaryLists">
<h2>Public Methods</h2>
<table class="Methods summary">
<thead>
<tr>
<th>Method</th>
<th>Defined By</th>
</tr>
</thead>
<tbody>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.UndoManager.html#add">add</a>(l:Object):Object</div>
<div class="summary">Adds a new undo level/snapshot to the undo list.</div>
</td>
<td class="last">UndoManager</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.UndoManager.html#beforeChange">beforeChange</a>():void</div>
<div class="summary">Stores away a bookmark to be used when performing an undo action so that the selection is before the change has been mad...</div>
</td>
<td class="last">UndoManager</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.UndoManager.html#clear">clear</a>():void</div>
<div class="summary">Removes all undo levels.</div>
</td>
<td class="last">UndoManager</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.UndoManager.html#hasRedo">hasRedo</a>():Boolean</div>
<div class="summary">Returns true/false if the undo manager has any redo levels.</div>
</td>
<td class="last">UndoManager</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.UndoManager.html#hasUndo">hasUndo</a>():Boolean</div>
<div class="summary">Returns true/false if the undo manager has any undo levels.</div>
</td>
<td class="last">UndoManager</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.UndoManager.html#redo">redo</a>():Object</div>
<div class="summary">Redoes the last action.</div>
</td>
<td class="last">UndoManager</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.UndoManager.html#undo">undo</a>():Object</div>
<div class="summary">Undoes the last action.</div>
</td>
<td class="last">UndoManager</td>
</tr>
</tbody>
</table>
<h2>Public Events</h2>
<table class="Events summary">
<thead>
<tr>
<th>Event</th>
<th>Defined By</th>
</tr>
</thead>
<tbody>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.UndoManager.html#onAdd">onAdd</a>(sender:<a href="class_tinymce.UndoManager.html">UndoManager</a>, level:Object)</div>
<div class="summary">This event will fire each time a new undo level is added to the undo manager.</div>
</td>
<td class="last">UndoManager</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.UndoManager.html#onRedo">onRedo</a>(sender:<a href="class_tinymce.UndoManager.html">UndoManager</a>, level:Object)</div>
<div class="summary">This event will fire when the user make an redo of a change.</div>
</td>
<td class="last">UndoManager</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.UndoManager.html#onUndo">onUndo</a>(sender:<a href="class_tinymce.UndoManager.html">UndoManager</a>, level:Object)</div>
<div class="summary">This event will fire when the user make an undo of a change.</div>
</td>
<td class="last">UndoManager</td>
</tr>
</tbody>
</table>
</div>
<div class="detailsList">
<div class="details">
<h2>Method details</h2>
<div class="memberDetails" id="add">
<h3>add<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function add(l:Object):Object</code>
<div class="memberDescription">Adds a new undo level/snapshot to the undo list.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">l:Object</td>
<td class="last">Optional undo level object to add.</td>
</tr>
</table>
<h4>Returns</h4>
<div class="returns">Object - Undo level that got added or null it a level wasn't needed.</div>
</div>
<div class="memberDetails" id="beforeChange">
<h3>beforeChange<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function beforeChange():void</code>
<div class="memberDescription">Stores away a bookmark to be used when performing an undo action so that the selection is before
the change has been made.
</div>
</div>
<div class="memberDetails" id="clear">
<h3>clear<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function clear():void</code>
<div class="memberDescription">Removes all undo levels.
</div>
</div>
<div class="memberDetails" id="hasRedo">
<h3>hasRedo<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function hasRedo():Boolean</code>
<div class="memberDescription">Returns true/false if the undo manager has any redo levels.
</div>
<h4>Returns</h4>
<div class="returns">Boolean - true/false if the undo manager has any redo levels.</div>
</div>
<div class="memberDetails" id="hasUndo">
<h3>hasUndo<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function hasUndo():Boolean</code>
<div class="memberDescription">Returns true/false if the undo manager has any undo levels.
</div>
<h4>Returns</h4>
<div class="returns">Boolean - true/false if the undo manager has any undo levels.</div>
</div>
<div class="memberDetails" id="redo">
<h3>redo<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function redo():Object</code>
<div class="memberDescription">Redoes the last action.
</div>
<h4>Returns</h4>
<div class="returns">Object - Redo level or null if no redo was performed.</div>
</div>
<div class="memberDetails last" id="undo">
<h3>undo<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function undo():Object</code>
<div class="memberDescription">Undoes the last action.
</div>
<h4>Returns</h4>
<div class="returns">Object - Undo level or null if no undo was performed.</div>
</div>
</div>
<div class="details">
<h2>Event details</h2>
<div class="memberDetails" id="onAdd">
<h3>onAdd<span class="memberType">event</span>
</h3>
<code class="syntax">public 
						event onAdd(sender:<a href="class_tinymce.UndoManager.html">UndoManager</a>, level:Object)</code>
<div class="memberDescription">This event will fire each time a new undo level is added to the undo manager.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">sender:<a href="class_tinymce.UndoManager.html">UndoManager</a>
</td>
<td class="last">UndoManager instance that got the new level.</td>
</tr>
<tr>
<td class="first">level:Object</td>
<td class="last">The new level object containing a bookmark and contents.</td>
</tr>
</table>
</div>
<div class="memberDetails" id="onRedo">
<h3>onRedo<span class="memberType">event</span>
</h3>
<code class="syntax">public 
						event onRedo(sender:<a href="class_tinymce.UndoManager.html">UndoManager</a>, level:Object)</code>
<div class="memberDescription">This event will fire when the user make an redo of a change.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">sender:<a href="class_tinymce.UndoManager.html">UndoManager</a>
</td>
<td class="last">UndoManager instance that got the new level.</td>
</tr>
<tr>
<td class="first">level:Object</td>
<td class="last">The old level object containing a bookmark and contents.</td>
</tr>
</table>
</div>
<div class="memberDetails last" id="onUndo">
<h3>onUndo<span class="memberType">event</span>
</h3>
<code class="syntax">public 
						event onUndo(sender:<a href="class_tinymce.UndoManager.html">UndoManager</a>, level:Object)</code>
<div class="memberDescription">This event will fire when the user make an undo of a change.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">sender:<a href="class_tinymce.UndoManager.html">UndoManager</a>
</td>
<td class="last">UndoManager instance that got the new level.</td>
</tr>
<tr>
<td class="first">level:Object</td>
<td class="last">The old level object containing a bookmark and contents.</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</body>
</html>
